home *** CD-ROM | disk | FTP | other *** search
/ World of Education / World of Education.iso / world_d / drfinfo.zip / CMOS11.ZIP / CHKCMOS.BAT next >
DOS Batch File  |  1991-09-18  |  1KB  |  49 lines

  1. @ECHO OFF
  2. REM CHKCMOS.BAT -- ensures CMOS not damaged, repairs if it is.
  3. REM insert in AUTOEXEC.BAT to check CMOS.
  4. REM Must have done a CMOSSAVE C:\CMOS.SAV first
  5.  
  6. C:\SYS\CMOSChk.COM C:\CMOS.SAV
  7. IF NOT Errorlevel 1 GOTO DONE
  8.  
  9. REM CMOS check failed:
  10. REM could be 4 reasons:
  11.  
  12. REM 1. Never set up CMOS.SAV before
  13.  
  14. REM 2. CMOS.SAV has been deleted
  15.  
  16. REM 3. CMOS has been illegitimately tampered with
  17.  
  18. REM 4. CMOS has been deliberately changed, 
  19. REM    Clever user will have to abort,
  20. REM    then do a manual CMOSSAVE C:\CMOS.SAV
  21. REM    Normally, he would just delete CMOS.SAV before changing,
  22. REM    and this BAT file will recreate it.
  23.  
  24. IF NOT EXIST C:\CMOS.SAV GoTo MakeIt
  25.  
  26. Echo Abort now with Ctrl-Break if you do not wish to restore damaged CMOS
  27. Pause
  28.  
  29. REM Presume reason 3, try restoring
  30.  
  31. C:\SYS\CMOSREST.COM C:\CMOS.SAV
  32. IF NOT Errorlevel 1 GOTO DONE
  33. Echo CMOS is still corrupted
  34. Pause
  35. GoTo Done
  36.  
  37. :MakeIt
  38.  
  39. REM Build a NEW CMOS.SAV file
  40. Echo Missing CMOS.SAV file.  Recreating it.
  41. Pause
  42. C:\SYS\CMOSSAVE.COM C:\CMOS.SAV
  43. Echo You might also want to create a new A: Rescue floppy boot disk soon
  44. Echo Use CMOSSAVE A:\CMOS.SAV
  45. Pause
  46.  
  47. :DONE
  48. REM -30-
  49.